<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span class="hs-cpp">
#if __GLASGOW_HASKELL__ &gt;= 702
</span><span class="hs-pragma">{-# LANGUAGE Safe #-}</span><span class="hs-cpp">
#endif
</span><span class="hs-cpp">#if __GLASGOW_HASKELL__ &gt;= 706
</span><span class="hs-pragma">{-# LANGUAGE PolyKinds #-}</span><span class="hs-cpp">
#endif
</span><span class="hs-cpp">#if __GLASGOW_HASKELL__ &gt;= 710
</span><span class="hs-pragma">{-# LANGUAGE AutoDeriveTypeable #-}</span><span class="hs-cpp">
#endif
</span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- Module      :  Data.Functor.Reverse</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- Copyright   :  (c) Russell O'Connor 2009</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- License     :  BSD-style (see the file LICENSE)</span><span>
</span><span id="line-16"></span><span class="hs-comment">--</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- Maintainer  :  R.Paterson@city.ac.uk</span><span>
</span><span id="line-18"></span><span class="hs-comment">-- Stability   :  experimental</span><span>
</span><span id="line-19"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-20"></span><span class="hs-comment">--</span><span>
</span><span id="line-21"></span><span class="hs-comment">-- Making functors whose elements are notionally in the reverse order</span><span>
</span><span id="line-22"></span><span class="hs-comment">-- from the original functor.</span><span>
</span><span id="line-23"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-24"></span><span>
</span><span id="line-25"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Data.Functor.Reverse</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-26"></span><span>    </span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier">Reverse</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-27"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-28"></span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Control.Applicative.Backwards.html"><span class="hs-identifier">Control.Applicative.Backwards</span></a></span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#"><span class="hs-identifier">Data.Functor.Classes</span></a></span><span class="hs-cpp">
#if MIN_VERSION_base(4,12,0)
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Contravariant.html#"><span class="hs-identifier">Data.Functor.Contravariant</span></a></span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier">foldr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#foldr1"><span class="hs-identifier">foldr1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#foldl"><span class="hs-identifier">foldl</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#foldl1"><span class="hs-identifier">foldl1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier">null</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier">length</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Applicative.html#"><span class="hs-identifier">Control.Applicative</span></a></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span class="hs-cpp">
#if MIN_VERSION_base(4,9,0)
</span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#"><span class="hs-identifier">Control.Monad.Fail</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Fail</span></span><span class="hs-cpp">
#endif
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#"><span class="hs-identifier">Data.Foldable</span></a></span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Traversable.html#"><span class="hs-identifier">Data.Traversable</span></a></span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Monoid.html#"><span class="hs-identifier">Data.Monoid</span></a></span><span>
</span><span id="line-44"></span><span>
</span><span id="line-45"></span><span class="hs-comment">-- | The same functor, but with 'Foldable' and 'Traversable' instances</span><span>
</span><span id="line-46"></span><span class="hs-comment">-- that process the elements in the reverse order.</span><span>
</span><span id="line-47"></span><span class="hs-keyword">newtype</span><span> </span><span id="Reverse"><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-var">Reverse</span></a></span></span><span> </span><span id="local-6989586621679086828"><span class="annot"><a href="#local-6989586621679086828"><span class="hs-identifier hs-type">f</span></a></span></span><span> </span><span id="local-6989586621679086827"><span class="annot"><a href="#local-6989586621679086827"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Reverse"><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-var">Reverse</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="getReverse"><span class="annot"><span class="annottext">forall {k} (f :: k -&gt; *) (a :: k). Reverse f a -&gt; f a
</span><a href="Data.Functor.Reverse.html#getReverse"><span class="hs-identifier hs-var hs-var">getReverse</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679086828"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086827"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span id="local-6989586621679086819"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Eq1"><span class="hs-identifier hs-type">Eq1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086819"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Eq1"><span class="hs-identifier hs-type">Eq1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086819"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-50"></span><span>    </span><span id="local-6989586621679086536"><span class="annot"><span class="annottext">liftEq :: forall a b. (a -&gt; b -&gt; Bool) -&gt; Reverse f a -&gt; Reverse f b -&gt; Bool
</span><a href="../../base/src/Data.Functor.Classes.html#liftEq"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftEq</span></a></span></span><span> </span><span id="local-6989586621679086534"><span class="annot"><span class="annottext">a -&gt; b -&gt; Bool
</span><a href="#local-6989586621679086534"><span class="hs-identifier hs-var">eq</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span id="local-6989586621679086533"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086533"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span id="local-6989586621679086532"><span class="annot"><span class="annottext">f b
</span><a href="#local-6989586621679086532"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; Bool) -&gt; f a -&gt; f b -&gt; Bool
forall (f :: * -&gt; *) a b.
Eq1 f =&gt;
(a -&gt; b -&gt; Bool) -&gt; f a -&gt; f b -&gt; Bool
</span><a href="../../base/src/Data.Functor.Classes.html#liftEq"><span class="hs-identifier hs-var">liftEq</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; Bool
</span><a href="#local-6989586621679086534"><span class="hs-identifier hs-var">eq</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086533"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">f b
</span><a href="#local-6989586621679086532"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-51"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#liftEq"><span class="hs-pragma hs-type">liftEq</span></a></span><span> </span><span class="hs-pragma">#-}</span></span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span id="local-6989586621679086812"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Ord1"><span class="hs-identifier hs-type">Ord1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086812"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Ord1"><span class="hs-identifier hs-type">Ord1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086812"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-54"></span><span>    </span><span id="local-6989586621679086523"><span class="annot"><span class="annottext">liftCompare :: forall a b.
(a -&gt; b -&gt; Ordering) -&gt; Reverse f a -&gt; Reverse f b -&gt; Ordering
</span><a href="../../base/src/Data.Functor.Classes.html#liftCompare"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftCompare</span></a></span></span><span> </span><span id="local-6989586621679086521"><span class="annot"><span class="annottext">a -&gt; b -&gt; Ordering
</span><a href="#local-6989586621679086521"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span id="local-6989586621679086520"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086520"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span id="local-6989586621679086519"><span class="annot"><span class="annottext">f b
</span><a href="#local-6989586621679086519"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; Ordering) -&gt; f a -&gt; f b -&gt; Ordering
forall (f :: * -&gt; *) a b.
Ord1 f =&gt;
(a -&gt; b -&gt; Ordering) -&gt; f a -&gt; f b -&gt; Ordering
</span><a href="../../base/src/Data.Functor.Classes.html#liftCompare"><span class="hs-identifier hs-var">liftCompare</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; Ordering
</span><a href="#local-6989586621679086521"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086520"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">f b
</span><a href="#local-6989586621679086519"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-55"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#liftCompare"><span class="hs-pragma hs-type">liftCompare</span></a></span><span> </span><span class="hs-pragma">#-}</span></span><span>
</span><span id="line-56"></span><span>
</span><span id="line-57"></span><span id="local-6989586621679086802"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679086512"><span id="local-6989586621679086514"><span id="local-6989586621679086516"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Read1"><span class="hs-identifier hs-type">Read1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086802"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Read1"><span class="hs-identifier hs-type">Read1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086802"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-58"></span><span>    </span><span id="local-6989586621679086509"><span class="annot"><span class="annottext">liftReadsPrec :: forall a.
(Int -&gt; ReadS a) -&gt; ReadS [a] -&gt; Int -&gt; ReadS (Reverse f a)
</span><a href="../../base/src/Data.Functor.Classes.html#liftReadsPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftReadsPrec</span></a></span></span><span> </span><span id="local-6989586621679086507"><span class="annot"><span class="annottext">Int -&gt; ReadS a
</span><a href="#local-6989586621679086507"><span class="hs-identifier hs-var">rp</span></a></span></span><span> </span><span id="local-6989586621679086506"><span class="annot"><span class="annottext">ReadS [a]
</span><a href="#local-6989586621679086506"><span class="hs-identifier hs-var">rl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; ReadS (Reverse f a)) -&gt; Int -&gt; ReadS (Reverse f a)
forall a. (String -&gt; ReadS a) -&gt; Int -&gt; ReadS a
</span><a href="../../base/src/Data.Functor.Classes.html#readsData"><span class="hs-identifier hs-var">readsData</span></a></span><span> </span><span class="annot"><span class="annottext">((String -&gt; ReadS (Reverse f a)) -&gt; Int -&gt; ReadS (Reverse f a))
-&gt; (String -&gt; ReadS (Reverse f a)) -&gt; Int -&gt; ReadS (Reverse f a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-59"></span><span>        </span><span class="annot"><span class="annottext">(Int -&gt; ReadS (f a))
-&gt; String -&gt; (f a -&gt; Reverse f a) -&gt; String -&gt; ReadS (Reverse f a)
forall a t.
(Int -&gt; ReadS a) -&gt; String -&gt; (a -&gt; t) -&gt; String -&gt; ReadS t
</span><a href="../../base/src/Data.Functor.Classes.html#readsUnaryWith"><span class="hs-identifier hs-var">readsUnaryWith</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Int -&gt; ReadS a) -&gt; ReadS [a] -&gt; Int -&gt; ReadS (f a)
forall (f :: * -&gt; *) a.
Read1 f =&gt;
(Int -&gt; ReadS a) -&gt; ReadS [a] -&gt; Int -&gt; ReadS (f a)
</span><a href="../../base/src/Data.Functor.Classes.html#liftReadsPrec"><span class="hs-identifier hs-var">liftReadsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadS a
</span><a href="#local-6989586621679086507"><span class="hs-identifier hs-var">rp</span></a></span><span> </span><span class="annot"><span class="annottext">ReadS [a]
</span><a href="#local-6989586621679086506"><span class="hs-identifier hs-var">rl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Reverse&quot;</span></span><span> </span><span class="annot"><span class="annottext">f a -&gt; Reverse f a
forall {k} (f :: k -&gt; *) (a :: k). f a -&gt; Reverse f a
</span><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-var">Reverse</span></a></span></span><span>
</span><span id="line-60"></span><span>
</span><span id="line-61"></span><span id="local-6989586621679086790"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679086501"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Show1"><span class="hs-identifier hs-type">Show1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086790"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Show1"><span class="hs-identifier hs-type">Show1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086790"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-62"></span><span>    </span><span id="local-6989586621679086498"><span class="annot"><span class="annottext">liftShowsPrec :: forall a.
(Int -&gt; a -&gt; ShowS)
-&gt; ([a] -&gt; ShowS) -&gt; Int -&gt; Reverse f a -&gt; ShowS
</span><a href="../../base/src/Data.Functor.Classes.html#liftShowsPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftShowsPrec</span></a></span></span><span> </span><span id="local-6989586621679086496"><span class="annot"><span class="annottext">Int -&gt; a -&gt; ShowS
</span><a href="#local-6989586621679086496"><span class="hs-identifier hs-var">sp</span></a></span></span><span> </span><span id="local-6989586621679086495"><span class="annot"><span class="annottext">[a] -&gt; ShowS
</span><a href="#local-6989586621679086495"><span class="hs-identifier hs-var">sl</span></a></span></span><span> </span><span id="local-6989586621679086494"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086494"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span id="local-6989586621679086493"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086493"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-63"></span><span>        </span><span class="annot"><span class="annottext">(Int -&gt; f a -&gt; ShowS) -&gt; String -&gt; Int -&gt; f a -&gt; ShowS
forall a. (Int -&gt; a -&gt; ShowS) -&gt; String -&gt; Int -&gt; a -&gt; ShowS
</span><a href="../../base/src/Data.Functor.Classes.html#showsUnaryWith"><span class="hs-identifier hs-var">showsUnaryWith</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Int -&gt; a -&gt; ShowS) -&gt; ([a] -&gt; ShowS) -&gt; Int -&gt; f a -&gt; ShowS
forall (f :: * -&gt; *) a.
Show1 f =&gt;
(Int -&gt; a -&gt; ShowS) -&gt; ([a] -&gt; ShowS) -&gt; Int -&gt; f a -&gt; ShowS
</span><a href="../../base/src/Data.Functor.Classes.html#liftShowsPrec"><span class="hs-identifier hs-var">liftShowsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; a -&gt; ShowS
</span><a href="#local-6989586621679086496"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; ShowS
</span><a href="#local-6989586621679086495"><span class="hs-identifier hs-var">sl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Reverse&quot;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086494"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086493"><span class="hs-identifier hs-var">x</span></a></span></span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span id="local-6989586621679086785"><span id="local-6989586621679086786"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679086489"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Eq1"><span class="hs-identifier hs-type">Eq1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086786"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="#local-6989586621679086785"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086786"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086785"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679086485"><span class="annot"><span class="annottext">== :: Reverse f a -&gt; Reverse f a -&gt; Bool
</span><span class="hs-operator hs-var hs-var hs-var hs-var">(==)</span></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Reverse f a -&gt; Reverse f a -&gt; Bool
forall (f :: * -&gt; *) a. (Eq1 f, Eq a) =&gt; f a -&gt; f a -&gt; Bool
</span><a href="../../base/src/Data.Functor.Classes.html#eq1"><span class="hs-identifier hs-var">eq1</span></a></span></span></span><span>
</span><span id="line-66"></span><span id="local-6989586621679086780"><span id="local-6989586621679086781"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679086469"><span id="local-6989586621679086471"><span id="local-6989586621679086473"><span id="local-6989586621679086475"><span id="local-6989586621679086477"><span id="local-6989586621679086479"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Ord1"><span class="hs-identifier hs-type">Ord1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086781"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="annot"><a href="#local-6989586621679086780"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086781"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086780"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679086465"><span class="annot"><span class="annottext">compare :: Reverse f a -&gt; Reverse f a -&gt; Ordering
</span><span class="hs-identifier hs-var hs-var hs-var hs-var">compare</span></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Reverse f a -&gt; Reverse f a -&gt; Ordering
forall (f :: * -&gt; *) a. (Ord1 f, Ord a) =&gt; f a -&gt; f a -&gt; Ordering
</span><a href="../../base/src/Data.Functor.Classes.html#compare1"><span class="hs-identifier hs-var">compare1</span></a></span></span></span><span>
</span><span id="line-67"></span><span id="local-6989586621679086775"><span id="local-6989586621679086776"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679086456"><span id="local-6989586621679086458"><span id="local-6989586621679086460"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Read1"><span class="hs-identifier hs-type">Read1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086776"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-type">Read</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086775"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-type">Read</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086776"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086775"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679086452"><span class="annot"><span class="annottext">readsPrec :: Int -&gt; ReadS (Reverse f a)
</span><a href="../../base/src/GHC.Read.html#readsPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">readsPrec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadS (Reverse f a)
forall (f :: * -&gt; *) a. (Read1 f, Read a) =&gt; Int -&gt; ReadS (f a)
</span><a href="../../base/src/Data.Functor.Classes.html#readsPrec1"><span class="hs-identifier hs-var">readsPrec1</span></a></span></span></span><span>
</span><span id="line-68"></span><span id="local-6989586621679086770"><span id="local-6989586621679086771"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679086445"><span id="local-6989586621679086447"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Show1"><span class="hs-identifier hs-type">Show1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086771"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086770"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086771"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086770"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679086441"><span class="annot"><span class="annottext">showsPrec :: Int -&gt; Reverse f a -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#showsPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">showsPrec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reverse f a -&gt; ShowS
forall (f :: * -&gt; *) a. (Show1 f, Show a) =&gt; Int -&gt; f a -&gt; ShowS
</span><a href="../../base/src/Data.Functor.Classes.html#showsPrec1"><span class="hs-identifier hs-var">showsPrec1</span></a></span></span></span><span>
</span><span id="line-69"></span><span>
</span><span id="line-70"></span><span class="hs-comment">-- | Derived instance.</span><span>
</span><span id="line-71"></span><span id="local-6989586621679086762"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679086436"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086762"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086762"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-72"></span><span>    </span><span id="local-6989586621679086433"><span class="annot"><span class="annottext">fmap :: forall a b. (a -&gt; b) -&gt; Reverse f a -&gt; Reverse f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var hs-var hs-var hs-var">fmap</span></a></span></span><span> </span><span id="local-6989586621679086432"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679086432"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span id="local-6989586621679086431"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086431"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f b -&gt; Reverse f b
forall {k} (f :: k -&gt; *) (a :: k). f a -&gt; Reverse f a
</span><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-var">Reverse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; f a -&gt; f b
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679086432"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086431"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-73"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-pragma hs-type">fmap</span></a></span><span> </span><span class="hs-pragma">#-}</span></span><span>
</span><span id="line-74"></span><span>
</span><span id="line-75"></span><span class="hs-comment">-- | Derived instance.</span><span>
</span><span id="line-76"></span><span id="local-6989586621679086748"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679086421"><span id="local-6989586621679086423"><span id="local-6989586621679086425"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086748"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086748"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-77"></span><span>    </span><span id="local-6989586621679086418"><span class="annot"><span class="annottext">pure :: forall a. a -&gt; Reverse f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var hs-var hs-var hs-var">pure</span></a></span></span><span> </span><span id="local-6989586621679086417"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679086417"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f a -&gt; Reverse f a
forall {k} (f :: k -&gt; *) (a :: k). f a -&gt; Reverse f a
</span><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-var">Reverse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; f a
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679086417"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-78"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#pure"><span class="hs-pragma hs-type">pure</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-79"></span><span>    </span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span id="local-6989586621679086415"><span class="annot"><span class="annottext">f (a -&gt; b)
</span><a href="#local-6989586621679086415"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679086414"><span class="annot"><span class="annottext">&lt;*&gt; :: forall a b. Reverse f (a -&gt; b) -&gt; Reverse f a -&gt; Reverse f b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;*&gt;</span></a></span></span><span> </span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span id="local-6989586621679086413"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086413"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f b -&gt; Reverse f b
forall {k} (f :: k -&gt; *) (a :: k). f a -&gt; Reverse f a
</span><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-var">Reverse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">f (a -&gt; b)
</span><a href="#local-6989586621679086415"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">f (a -&gt; b) -&gt; f a -&gt; f b
forall (f :: * -&gt; *) a b. Applicative f =&gt; f (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var">&lt;*&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086413"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-80"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">&lt;*&gt;</span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span></span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span class="hs-comment">-- | Derived instance.</span><span>
</span><span id="line-83"></span><span id="local-6989586621679086740"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679086405"><span id="local-6989586621679086407"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Alternative"><span class="hs-identifier hs-type">Alternative</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086740"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Alternative"><span class="hs-identifier hs-type">Alternative</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086740"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-84"></span><span>    </span><span id="local-6989586621679086402"><span class="annot"><span class="annottext">empty :: forall a. Reverse f a
</span><a href="../../base/src/GHC.Base.html#empty"><span class="hs-identifier hs-var hs-var hs-var hs-var">empty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f a -&gt; Reverse f a
forall {k} (f :: k -&gt; *) (a :: k). f a -&gt; Reverse f a
</span><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-var">Reverse</span></a></span><span> </span><span class="annot"><span class="annottext">f a
forall (f :: * -&gt; *) a. Alternative f =&gt; f a
</span><a href="../../base/src/GHC.Base.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-85"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#empty"><span class="hs-pragma hs-type">empty</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-86"></span><span>    </span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span id="local-6989586621679086399"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086399"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679086398"><span class="annot"><span class="annottext">&lt;|&gt; :: forall a. Reverse f a -&gt; Reverse f a -&gt; Reverse f a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;|&gt;</span></a></span></span><span> </span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span id="local-6989586621679086396"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086396"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f a -&gt; Reverse f a
forall {k} (f :: k -&gt; *) (a :: k). f a -&gt; Reverse f a
</span><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-var">Reverse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086399"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">f a -&gt; f a -&gt; f a
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086396"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-87"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">&lt;|&gt;</span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span></span><span>
</span><span id="line-88"></span><span>
</span><span id="line-89"></span><span class="hs-comment">-- | Derived instance.</span><span>
</span><span id="line-90"></span><span id="local-6989586621679086731"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679086389"><span id="local-6989586621679086391"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086731"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086731"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">
#if !(MIN_VERSION_base(4,8,0))
</span><span>    </span><span class="hs-identifier">return</span><span> </span><span class="hs-identifier">a</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">Reverse</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">return</span><span> </span><span class="hs-identifier">a</span><span class="hs-special">)</span><span>
</span><span id="line-93"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">return</span><span> </span><span class="hs-pragma">#-}</span><span class="hs-cpp">
#endif
</span><span>    </span><span id="local-6989586621679086386"><span class="annot"><span class="annottext">Reverse m a
</span><a href="#local-6989586621679086386"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679086385"><span class="annot"><span class="annottext">&gt;&gt;= :: forall a b. Reverse m a -&gt; (a -&gt; Reverse m b) -&gt; Reverse m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">&gt;&gt;=</span></a></span></span><span> </span><span id="local-6989586621679086384"><span class="annot"><span class="annottext">a -&gt; Reverse m b
</span><a href="#local-6989586621679086384"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m b -&gt; Reverse m b
forall {k} (f :: k -&gt; *) (a :: k). f a -&gt; Reverse f a
</span><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-var">Reverse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Reverse m a -&gt; m a
forall {k} (f :: k -&gt; *) (a :: k). Reverse f a -&gt; f a
</span><a href="Data.Functor.Reverse.html#getReverse"><span class="hs-identifier hs-var hs-var">getReverse</span></a></span><span> </span><span class="annot"><span class="annottext">Reverse m a
</span><a href="#local-6989586621679086386"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">m a -&gt; (a -&gt; m b) -&gt; m b
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Reverse m b -&gt; m b
forall {k} (f :: k -&gt; *) (a :: k). Reverse f a -&gt; f a
</span><a href="Data.Functor.Reverse.html#getReverse"><span class="hs-identifier hs-var hs-var">getReverse</span></a></span><span> </span><span class="annot"><span class="annottext">(Reverse m b -&gt; m b) -&gt; (a -&gt; Reverse m b) -&gt; a -&gt; m b
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Reverse m b
</span><a href="#local-6989586621679086384"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-96"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">&gt;&gt;=</span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span></span><span class="hs-cpp">
#if !(MIN_VERSION_base(4,13,0))
</span><span>    </span><span class="hs-identifier">fail</span><span> </span><span class="hs-identifier">msg</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">Reverse</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">fail</span><span> </span><span class="hs-identifier">msg</span><span class="hs-special">)</span><span>
</span><span id="line-99"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">fail</span><span> </span><span class="hs-pragma">#-}</span><span class="hs-cpp">
#endif
</span><span class="hs-cpp">
#if MIN_VERSION_base(4,9,0)
</span><span id="local-6989586621679086722"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#MonadFail"><span class="hs-identifier hs-type">Fail.MonadFail</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086722"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#MonadFail"><span class="hs-identifier hs-type">Fail.MonadFail</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086722"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-104"></span><span>    </span><span id="local-6989586621679086373"><span class="annot"><span class="annottext">fail :: forall a. String -&gt; Reverse m a
</span><a href="../../base/src/Control.Monad.Fail.html#fail"><span class="hs-identifier hs-var hs-var hs-var hs-var">fail</span></a></span></span><span> </span><span id="local-6989586621679086372"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679086372"><span class="hs-identifier hs-var">msg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m a -&gt; Reverse m a
forall {k} (f :: k -&gt; *) (a :: k). f a -&gt; Reverse f a
</span><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-var">Reverse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; m a
forall (m :: * -&gt; *) a. MonadFail m =&gt; String -&gt; m a
</span><a href="../../base/src/Control.Monad.Fail.html#fail"><span class="hs-identifier hs-var">Fail.fail</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679086372"><span class="hs-identifier hs-var">msg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-105"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#fail"><span class="hs-pragma hs-type">fail</span></a></span><span> </span><span class="hs-pragma">#-}</span></span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-108"></span><span class="hs-comment">-- | Derived instance.</span><span>
</span><span id="line-109"></span><span id="local-6989586621679086715"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#MonadPlus"><span class="hs-identifier hs-type">MonadPlus</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086715"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#MonadPlus"><span class="hs-identifier hs-type">MonadPlus</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086715"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-110"></span><span>    </span><span id="local-6989586621679086357"><span class="annot"><span class="annottext">mzero :: forall a. Reverse m a
</span><a href="../../base/src/GHC.Base.html#mzero"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzero</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m a -&gt; Reverse m a
forall {k} (f :: k -&gt; *) (a :: k). f a -&gt; Reverse f a
</span><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-var">Reverse</span></a></span><span> </span><span class="annot"><span class="annottext">m a
forall (m :: * -&gt; *) a. MonadPlus m =&gt; m a
</span><a href="../../base/src/GHC.Base.html#mzero"><span class="hs-identifier hs-var">mzero</span></a></span><span>
</span><span id="line-111"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#mzero"><span class="hs-pragma hs-type">mzero</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-112"></span><span>    </span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span id="local-6989586621679086354"><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679086354"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679086353"><span class="annot"><span class="annottext">mplus :: forall a. Reverse m a -&gt; Reverse m a -&gt; Reverse m a
</span><a href="../../base/src/GHC.Base.html#mplus"><span class="hs-operator hs-var hs-var hs-var hs-var">`mplus`</span></a></span></span><span> </span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span id="local-6989586621679086351"><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679086351"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m a -&gt; Reverse m a
forall {k} (f :: k -&gt; *) (a :: k). f a -&gt; Reverse f a
</span><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-var">Reverse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679086354"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">m a -&gt; m a -&gt; m a
forall (m :: * -&gt; *) a. MonadPlus m =&gt; m a -&gt; m a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#mplus"><span class="hs-operator hs-var">`mplus`</span></a></span><span> </span><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679086351"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-113"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#mplus"><span class="hs-pragma hs-type">mplus</span></a></span><span> </span><span class="hs-pragma">#-}</span></span><span>
</span><span id="line-114"></span><span>
</span><span id="line-115"></span><span class="hs-comment">-- | Fold from right to left.</span><span>
</span><span id="line-116"></span><span id="local-6989586621679086697"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679086324"><span id="local-6989586621679086326"><span id="local-6989586621679086328"><span id="local-6989586621679086330"><span id="local-6989586621679086332"><span id="local-6989586621679086336"><span id="local-6989586621679086340"><span id="local-6989586621679086343"><span id="local-6989586621679086346"><span id="local-6989586621679086349"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Foldable.html#Foldable"><span class="hs-identifier hs-type">Foldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086697"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#Foldable"><span class="hs-identifier hs-type">Foldable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086697"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span></span></span></span></span></span></span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-117"></span><span>    </span><span id="local-6989586621679086318"><span class="annot"><span class="annottext">foldMap :: forall m a. Monoid m =&gt; (a -&gt; m) -&gt; Reverse f a -&gt; m
</span><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-identifier hs-var hs-var hs-var hs-var">foldMap</span></a></span></span><span> </span><span id="local-6989586621679086316"><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679086316"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span id="local-6989586621679086315"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086315"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Dual m -&gt; m
forall a. Dual a -&gt; a
</span><a href="../../base/src/Data.Semigroup.Internal.html#getDual"><span class="hs-identifier hs-var hs-var">getDual</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; Dual m) -&gt; f a -&gt; Dual m
forall (t :: * -&gt; *) m a.
(Foldable t, Monoid m) =&gt;
(a -&gt; m) -&gt; t a -&gt; m
</span><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-identifier hs-var">foldMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">m -&gt; Dual m
forall a. a -&gt; Dual a
</span><a href="../../base/src/Data.Semigroup.Internal.html#Dual"><span class="hs-identifier hs-var">Dual</span></a></span><span> </span><span class="annot"><span class="annottext">(m -&gt; Dual m) -&gt; (a -&gt; m) -&gt; a -&gt; Dual m
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679086316"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086315"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-118"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-pragma hs-type">foldMap</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-119"></span><span>    </span><span id="local-6989586621679086311"><span class="annot"><span class="annottext">foldr :: forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; Reverse f a -&gt; b
</span><a href="#local-6989586621679086311"><span class="hs-identifier hs-var hs-var hs-var hs-var">foldr</span></a></span></span><span> </span><span id="local-6989586621679086310"><span class="annot"><span class="annottext">a -&gt; b -&gt; b
</span><a href="#local-6989586621679086310"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679086309"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679086309"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span id="local-6989586621679086308"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086308"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a -&gt; b) -&gt; b -&gt; f a -&gt; b
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl"><span class="hs-identifier hs-var">foldl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b -&gt; b) -&gt; b -&gt; a -&gt; b
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; b
</span><a href="#local-6989586621679086310"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679086309"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086308"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-120"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-pragma hs-type">foldr</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-121"></span><span>    </span><span id="local-6989586621679086305"><span class="annot"><span class="annottext">foldl :: forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; Reverse f a -&gt; b
</span><a href="#local-6989586621679086305"><span class="hs-identifier hs-var hs-var hs-var hs-var">foldl</span></a></span></span><span> </span><span id="local-6989586621679086304"><span class="annot"><span class="annottext">b -&gt; a -&gt; b
</span><a href="#local-6989586621679086304"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679086303"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679086303"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span id="local-6989586621679086302"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086302"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; b) -&gt; b -&gt; f a -&gt; b
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(b -&gt; a -&gt; b) -&gt; a -&gt; b -&gt; b
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a -&gt; b
</span><a href="#local-6989586621679086304"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679086303"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086302"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-122"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#foldl"><span class="hs-pragma hs-type">foldl</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-123"></span><span>    </span><span id="local-6989586621679086300"><span class="annot"><span class="annottext">foldr1 :: forall a. (a -&gt; a -&gt; a) -&gt; Reverse f a -&gt; a
</span><a href="#local-6989586621679086300"><span class="hs-identifier hs-var hs-var hs-var hs-var">foldr1</span></a></span></span><span> </span><span id="local-6989586621679086299"><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="#local-6989586621679086299"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span id="local-6989586621679086298"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086298"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; a) -&gt; f a -&gt; a
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; a -&gt; a) -&gt; t a -&gt; a
</span><a href="../../base/src/Data.Foldable.html#foldl1"><span class="hs-identifier hs-var">foldl1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; a -&gt; a) -&gt; a -&gt; a -&gt; a
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="#local-6989586621679086299"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086298"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-124"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#foldr1"><span class="hs-pragma hs-type">foldr1</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-125"></span><span>    </span><span id="local-6989586621679086296"><span class="annot"><span class="annottext">foldl1 :: forall a. (a -&gt; a -&gt; a) -&gt; Reverse f a -&gt; a
</span><a href="#local-6989586621679086296"><span class="hs-identifier hs-var hs-var hs-var hs-var">foldl1</span></a></span></span><span> </span><span id="local-6989586621679086295"><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="#local-6989586621679086295"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span id="local-6989586621679086294"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086294"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; a) -&gt; f a -&gt; a
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; a -&gt; a) -&gt; t a -&gt; a
</span><a href="../../base/src/Data.Foldable.html#foldr1"><span class="hs-identifier hs-var">foldr1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; a -&gt; a) -&gt; a -&gt; a -&gt; a
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="#local-6989586621679086295"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086294"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-126"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#foldl1"><span class="hs-pragma hs-type">foldl1</span></a></span><span> </span><span class="hs-pragma">#-}</span><span class="hs-cpp">
#if MIN_VERSION_base(4,8,0)
</span><span>    </span><span id="local-6989586621679086292"><span class="annot"><span class="annottext">null :: forall a. Reverse f a -&gt; Bool
</span><a href="#local-6989586621679086292"><span class="hs-identifier hs-var hs-var hs-var hs-var">null</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span id="local-6989586621679086291"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086291"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f a -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086291"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-129"></span><span>    </span><span id="local-6989586621679086289"><span class="annot"><span class="annottext">length :: forall a. Reverse f a -&gt; Int
</span><a href="#local-6989586621679086289"><span class="hs-identifier hs-var hs-var hs-var hs-var">length</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span id="local-6989586621679086288"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086288"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f a -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086288"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-132"></span><span class="hs-comment">-- | Traverse from right to left.</span><span>
</span><span id="line-133"></span><span id="local-6989586621679086668"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679086277"><span id="local-6989586621679086279"><span id="local-6989586621679086281"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Traversable.html#Traversable"><span class="hs-identifier hs-type">Traversable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086668"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Traversable.html#Traversable"><span class="hs-identifier hs-type">Traversable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086668"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-134"></span><span>    </span><span id="local-6989586621679086269"><span class="annot"><span class="annottext">traverse :: forall (f :: * -&gt; *) a b.
Applicative f =&gt;
(a -&gt; f b) -&gt; Reverse f a -&gt; f (Reverse f b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var hs-var hs-var hs-var">traverse</span></a></span></span><span> </span><span id="local-6989586621679086267"><span class="annot"><span class="annottext">a -&gt; f b
</span><a href="#local-6989586621679086267"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span id="local-6989586621679086266"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086266"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-135"></span><span>        </span><span class="annot"><span class="annottext">(f b -&gt; Reverse f b) -&gt; f (f b) -&gt; f (Reverse f b)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">f b -&gt; Reverse f b
forall {k} (f :: k -&gt; *) (a :: k). f a -&gt; Reverse f a
</span><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-var">Reverse</span></a></span><span> </span><span class="annot"><span class="annottext">(f (f b) -&gt; f (Reverse f b))
-&gt; (Backwards f (f b) -&gt; f (f b))
-&gt; Backwards f (f b)
-&gt; f (Reverse f b)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Backwards f (f b) -&gt; f (f b)
forall {k} (f :: k -&gt; *) (a :: k). Backwards f a -&gt; f a
</span><a href="Control.Applicative.Backwards.html#forwards"><span class="hs-identifier hs-var hs-var">forwards</span></a></span><span> </span><span class="annot"><span class="annottext">(Backwards f (f b) -&gt; f (Reverse f b))
-&gt; Backwards f (f b) -&gt; f (Reverse f b)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; Backwards f b) -&gt; f a -&gt; Backwards f (f b)
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">f b -&gt; Backwards f b
forall {k} (f :: k -&gt; *) (a :: k). f a -&gt; Backwards f a
</span><a href="Control.Applicative.Backwards.html#Backwards"><span class="hs-identifier hs-var">Backwards</span></a></span><span> </span><span class="annot"><span class="annottext">(f b -&gt; Backwards f b) -&gt; (a -&gt; f b) -&gt; a -&gt; Backwards f b
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; f b
</span><a href="#local-6989586621679086267"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679086266"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-136"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-pragma hs-type">traverse</span></a></span><span> </span><span class="hs-pragma">#-}</span></span><span class="hs-cpp">

#if MIN_VERSION_base(4,12,0)
</span><span class="hs-comment">-- | Derived instance.</span><span>
</span><span id="line-140"></span><span id="local-6989586621679086654"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679086261"><span class="annot"><a href="../../base/src/Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086654"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-type">Reverse</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679086654"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-141"></span><span>    </span><span id="local-6989586621679086258"><span class="annot"><span class="annottext">contramap :: forall a' a. (a' -&gt; a) -&gt; Reverse f a -&gt; Reverse f a'
</span><a href="../../base/src/Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-var hs-var hs-var hs-var">contramap</span></a></span></span><span> </span><span id="local-6989586621679086256"><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679086256"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f a' -&gt; Reverse f a'
forall {k} (f :: k -&gt; *) (a :: k). f a -&gt; Reverse f a
</span><a href="Data.Functor.Reverse.html#Reverse"><span class="hs-identifier hs-var">Reverse</span></a></span><span> </span><span class="annot"><span class="annottext">(f a' -&gt; Reverse f a')
-&gt; (Reverse f a -&gt; f a') -&gt; Reverse f a -&gt; Reverse f a'
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(a' -&gt; a) -&gt; f a -&gt; f a'
forall (f :: * -&gt; *) a' a.
Contravariant f =&gt;
(a' -&gt; a) -&gt; f a -&gt; f a'
</span><a href="../../base/src/Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-var">contramap</span></a></span><span> </span><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679086256"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">(f a -&gt; f a') -&gt; (Reverse f a -&gt; f a) -&gt; Reverse f a -&gt; f a'
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Reverse f a -&gt; f a
forall {k} (f :: k -&gt; *) (a :: k). Reverse f a -&gt; f a
</span><a href="Data.Functor.Reverse.html#getReverse"><span class="hs-identifier hs-var hs-var">getReverse</span></a></span><span>
</span><span id="line-142"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Contravariant.html#contramap"><span class="hs-pragma hs-type">contramap</span></a></span><span> </span><span class="hs-pragma">#-}</span></span><span class="hs-cpp">
#endif
</span></pre></body></html>